import { stringify } from 'qs';
import request from '@/utils/request';

export async function fetch({ id }) {
  return request(`/clover/api/v1/goods/${id}`);
}

export async function update({ id, ...body }) {
  // return request(`/clover/api/v1/goods?${stringify(params)}`);
  return request(`/clover/api/v1/goods/${id}`, {
    method: 'PUT',
    body,
  });
}